/*
 * @Description: 用户相关接口 如登录等
 * @Author: liushuang
 * @Date: 2022-06-01 15:26:53
 * @LastEditTime: 2022-12-06 10:41:22
 */
import request from '@/request/index'

/**
 * @desc: 用户登录
 */
export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

/**
 * @desc: 退出登录
 */
export function logout() {
  return request({
    url: '/user/logout',
    method: 'delete'
  })
}

/**
 * @desc: 获取用户信息
 */
export function fetchUserInfo(data) {
  return request({
    url: '/user/info',
    method: 'get',
    data
  })
}
